<%@ page import="java.util.Date" %>
<%@ page import="com.javaweb.common.StringTool" %><%--
  Function: 
  User: PING
  Date: 2022/9/22

--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<%
    // get the cached data from Objects
    // request obj
/*    String gotName = (String) request.getAttribute("name") ;
    Date nowDate = (Date) request.getAttribute("time") ;*/
    // got data from session obj
//    String gotName = (String) session.getAttribute("name") ;
//    Date nowDate = (Date) session.getAttribute("time") ;
    // got data from application obj
    String gotName = (String) application.getAttribute("name") ;
    Date nowDate = (Date) application.getAttribute("time") ;

%>

<div class="show">
    <h3>访问人： <%=gotName%></h3><br>
    <h3>访问时间： <%=StringTool.formatTime(nowDate) %></h3>
</div>

</body>
</html>
